import { stockApi } from "@/api/index.js";
import { mapState } from "vuex";
export default {
    components: {},
    name: 'home',
    data() {
        return {
            summary1: {
                status: 1,                              // 1蓝色 2浅绿色 3-绿色 4-红色
                data1: '3,205.44',
                data2: '2,347.03',
                data3: '7,052,526.82',
                data4: '4,704,674.32',
                data5: '938,728.5',
                data6: '952,993',
            },
            summary2: {
                status: 1,                              // 1蓝色 2浅绿色 3-绿色 4-红色
                data1: '25,004,890.18',
                data2: '2,760,305',
                data3: '441,569',
                data4: '0',
            },
            memberList: [
                {
                    name: '李轩光',
                    data1: '12,685,285',
                    data2: '9,708,957',
                    data3: '2,924,050',
                    data4: '983,689',
                    data5: '573,551',
                    data6: '876,176',
                    data7: '9,762,621',
                    data8: '1,974,041',
                    data9: '297,640',
                    data10: '0',
                },
                {
                    name: '肖欣欣',
                    data1: '12,685,285',
                    data2: '9,708,957',
                    data3: '2,924,050',
                    data4: '983,689',
                    data5: '573,551',
                    data6: '876,176',
                    data7: '9,762,621',
                    data8: '1,974,041',
                    data9: '297,640',
                    data10: '0',
                },
                {
                    name: '冯子增',
                    data1: '12,685,285',
                    data2: '9,708,957',
                    data3: '2,924,050',
                    data4: '983,689',
                    data5: '573,551',
                    data6: '876,176',
                    data7: '9,762,621',
                    data8: '1,974,041',
                    data9: '297,640',
                    data10: '0',
                },
                {
                    name: '涂志蒙',
                    data1: '12,685,285',
                    data2: '9,708,957',
                    data3: '2,924,050',
                    data4: '983,689',
                    data5: '573,551',
                    data6: '876,176',
                    data7: '9,762,621',
                    data8: '1,974,041',
                    data9: '297,640',
                    data10: '0',
                }
            ],
            statistics: [
                {
                    name: '发货数量',
                    status: 'status1',
                    statusText: '今日',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '发货总重量',
                    status: 'status2',
                    statusText: '今日',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '<5kg订单数量',
                    status: 'status3',
                    statusText: '今日',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '订单总金额',
                    status: 'status4',
                    statusText: '今日',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '订单总金额',
                    status: 'status1',
                    statusText: '今年',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '订单总量',
                    status: 'status2',
                    statusText: '今年',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '订单总金额',
                    status: 'status3',
                    statusText: '当月',
                    value: '0',
                    unit: '单'
                },
                {
                    name: '订单总量',
                    status: 'status4',
                    statusText: '当月',
                    value: '0',
                    unit: '单'
                },
            ]
        }
    },
    computed: {
        ...mapState(['userInfo']),
    },

    mounted() {

    },
    methods: {
        handleShowPrivateRoomTips() {
            this.showPrivateRoomTips = true;
            this.$refs.refPrivateRoomTips && this.$refs.refPrivateRoomTips.show();
        },
        handleSubmit(number, type) {            // 提交引导显示次数
            this.activeMask = -1;
            let sv_novice_count = type === 'add' ? this.$store.state.maskEntity.count + number : number;
            stockApi.OperateNoviceGuide({ id: this.$store.state.maskEntity.id, sv_novice_count: sv_novice_count }).then(res => {
                this.$store.commit('updateMaskEntity', { id: -1, count: 0 });
            });
        },
    }
};